package com.ssm.supplier.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssm.common.utils.PageUtils;
import com.ssm.common.utils.Query;
import com.ssm.supplier.dao.SsmSuorderDao;
import com.ssm.supplier.entity.SsmSuorderEntity;

import com.ssm.supplier.entity.vo.SupplierOrderVo;

import com.ssm.supplier.entity.vo.SuorderDto;

import com.ssm.supplier.entity.vo.SupplierOrderVo;
import com.ssm.supplier.entity.vo.SuorderDto;

import com.ssm.supplier.service.SsmSuorderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

import javax.annotation.Resource;
import java.util.ArrayList;

import java.util.List;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Map;


@Service("ssmSuorderService")
public class SsmSuorderServiceImpl extends ServiceImpl<SsmSuorderDao, SsmSuorderEntity> implements SsmSuorderService {


    @Autowired
    private SsmSuorderDao ssmSuorderDao;

@Resource
SsmSuorderDao suorderDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SsmSuorderEntity> page = this.page(
                new Query<SsmSuorderEntity>().getPage(params),
                new QueryWrapper<SsmSuorderEntity>()
        );
        return new PageUtils(page);
    }

    @Override

    public List<SupplierOrderVo> findSupplierOrder(Integer id) {
        return ssmSuorderDao.findSupplierOrder(id);
    }
    @Override
    public ArrayList<SuorderDto> findPage( Integer total,Integer size ,String key) {
        return suorderDao.selectOrder(total, size, key);
    }

    @Override
    public List<SupplierOrderVo> findOrderById(String key) {
        return ssmSuorderDao.findOrderById(key);
    }


}